package cn.webrx;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;

public class Io1 {
    public static void main(String[] args) throws Exception {


        InputStream in = new URL( "https://www.baidu.com" ).openStream();
        try {
            InputStreamReader inR = new InputStreamReader( in );
            BufferedReader buf = new BufferedReader( inR );
            String line;
            while ( ( line = buf.readLine() ) != null ) {
                System.out.println( line );
            }
        } finally {
            in.close();
        }

        //
        //
        //try {
        //    FileUtils.copyDirectory(new File("C:\\t1"),new File("C:\\t2"));
        //} catch (IOException e) {
        //    throw new RuntimeException(e);
        //}
    }
}
